<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>
<body>
    <script>
        alert('alert是一个警告框');//方法1  直接在html的script标签里面写
    </script>
    <script src="myjs.js"></script>  方法2 外联js 用src=""
</body>
</html>